package com.aacar.utils;

/**
 * @author fei.tang
 */
public class ErrorInfoUtil {
	
	/**
	 * 设置返回错误信息
	 * @param errorCode
	 * @param errorMessage
	 * @return
	 */
	public static Object setErrorInfo(String errorCode,String errorMessage){
		ResultErrorInfo resultErrorInfo = new ResultErrorInfo();
		resultErrorInfo.setErrorMessage(errorMessage);
		resultErrorInfo.setErrorCode(errorCode);
		resultErrorInfo.setServiceCode("10000");//默认统一返回,后续修改
		return resultErrorInfo; 
	}
	
	
	/**
	 * 设置返回错误信息
	 * @param errorCode
	 * @param errorMessage
	 * @param serviceCode
	 * @return
	 */
	public static Object setErrorInfo(String errorCode,String errorMessage,String serviceCode){
		ResultErrorInfo resultErrorInfo = new ResultErrorInfo();
		resultErrorInfo.setErrorMessage(errorMessage);
		resultErrorInfo.setErrorCode(errorCode);
		resultErrorInfo.setServiceCode(serviceCode);
		return resultErrorInfo; 
	}
	
}
